<template>
    <div class="detail">
        <Form inline>
       <#list filedNames as f >
           <FormItem label="${f.chName}：">{{form. ${f.fiName}}}</FormItem>
       </#list>
        </Form>
    </div>

</template>
<script>
    export default {
        data() {
            return {
                form: {}
            }
        },
        methods: {
            get() {

                this.$axios.get("/api/v1/${className?uncap_first}/get", {params: {id: this.$route.params.id}}).then((resp) => {
                    this.form = resp.data;
                })
            }
        },
        filters: {
            toDate: function (val) {
                var date = new Date(val);
                var pattern = "yyyy-MM-dd hh:mm:ss";
                return date.format(pattern);
            },
            free: function (val) {
                //,1下架,2上架
                var a = {"1": "免费", "2": "非免费"};
                return a[val];
            },
            state: function (val) {
                //,1下架,2上架
                var a = {"1": "下架", "2": "上架"};
                return a[val];
            }
        },
        mounted() {
            this.get();
        }
    }
</script>